workspace(name = "servlet")

load("//:bazlets.bzl", "load_bazlets")

load_bazlets(
    commit = "a511f3c90129d7de7ae67c0637001162980c08d5",
    #    local_path = "/home/<user>/projects/bazlets",
)

# Release Plugin API
load(
    "@com_googlesource_gerrit_bazlets//:gerrit_api.bzl",
    "gerrit_api",
)
#load("@bazel_tools//tools/build_defs/repo:jvm.bzl", "jvm_maven_import_external")
#jvm_maven_import_external(
#    name = "fastjson",
#    artifact = "com.alibaba:fastjson:1.2.4",
##    artifact_sha256 = "59721f0805e223d84b90677887d9ff567dc534d7c502ca903c0c2b17f05c116a",
#    server_urls = ["http://maven.aliyun.com/nexus/content/groups/public"],
#    licenses = ["notice"],  # Apache 2.0
#)
#jvm_maven_import_external(
#    name = "poi",
#    artifact = "org.apache.poi:poi:4.1.0",
##    artifact_sha256 = "59721f0805e223d84b90677887d9ff567dc534d7c502ca903c0c2b17f05c116a",
#    server_urls = ["http://maven.aliyun.com/nexus/content/groups/public"],
#    licenses = ["notice"],  # Apache 2.0
#)
#jvm_maven_import_external(
#    name = "ooxml",
#    artifact = "org.apache.poi:poi-ooxml:4.1.0",
##    artifact_sha256 = "59721f0805e223d84b90677887d9ff567dc534d7c502ca903c0c2b17f05c116a",
#    server_urls = ["http://maven.aliyun.com/nexus/content/groups/public"],
#    licenses = ["notice"],  # Apache 2.0
#)
#jvm_maven_import_external(
#    name = "schemas",
#    artifact = "org.apache.poi:poi-ooxml-schemas:4.1.0",
##    artifact_sha256 = "59721f0805e223d84b90677887d9ff567dc534d7c502ca903c0c2b17f05c116a",
#    server_urls = ["http://maven.aliyun.com/nexus/content/groups/public"],
#    licenses = ["notice"],  # Apache 2.0
#)
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")

RULES_JVM_EXTERNAL_TAG = "2.5"

RULES_JVM_EXTERNAL_SHA = "249e8129914be6d987ca57754516be35a14ea866c616041ff0cd32ea94d2f3a1"

http_archive(
    name = "rules_jvm_external",
    sha256 = RULES_JVM_EXTERNAL_SHA,
    strip_prefix = "rules_jvm_external-%s" % RULES_JVM_EXTERNAL_TAG,
    url = "https://github.com/bazelbuild/rules_jvm_external/archive/%s.zip" % RULES_JVM_EXTERNAL_TAG,
)

load("@rules_jvm_external//:defs.bzl", "maven_install")

maven_install(
    artifacts = [
        "junit:junit:4.11",
        "com.alibaba:fastjson:1.2.4",
        "org.apache.poi:poi:4.1.0",
        "org.apache.poi:poi-ooxml:4.1.0",
        "org.apache.poi:poi-ooxml-schemas:4.1.0",
        "com.urswolfer.gerrit.client.rest:gerrit-rest-java-client:0.9.4",
    ],
    fetch_sources = True,
    repositories = [
        "https://maven.aliyun.com/repository/public",
        "http://uk.maven.org/maven2",
        "https://jcenter.bintray.com/",
    ],
)
# Snapshot Plugin API
#load(
#    "@com_googlesource_gerrit_bazlets//:gerrit_api_maven_local.bzl",
#    "gerrit_api_maven_local",
#)

# Load release Plugin API
gerrit_api()

# Load snapshot Plugin API
#gerrit_api_maven_local()
